import service from "./service";

// 私信内容
export function getPrivateLetter(uid, cookie) {
  return service({
    url: `/msg/comments?uid=${uid}&cookie=${cookie}`,
  })
}

// 喜欢音乐列表
export function getLikeMusic(uid, cookie) {
  return service({
    url: `/likelist?uid=${uid}&cookie=${cookie}`,
    withCredentials: true,
    cookie
  })
}

// 获取用户详情
export function getUserDetalis(uid, cookie) {
  return service({
    url: `/user/detail?uid=${uid}&cookie=${cookie}`,
    method: 'get'
  })
}

// 获取用户等级信息
export function getUserLevel(cookie) {
  return service({
    url: `/user/level?cookie=${cookie}`,
    method: 'get'
  })
}

// 获取用户信息 , 歌单，收藏，mv, dj 数量
export function getUserSubcount(cookie) {
  return service({
    url: `/user/subcount?cookie=${cookie}`,
    method: 'get'
  })
}

// 获取用户歌单
export function getUserPlaylist(uid, cookie) {
  return service({
    url: `/user/playlist?uid=${uid}&cookie=${cookie}&limit=10`,
    method: 'get'
  })
}

// 获取评论
export function getMsgComments(uid, cookie) {
  return service({
    url: `/msg/comments?uid=${uid}&cookie=${cookie}`
  })
}

// 通知 - 私信
export function getMsgPrivate(limit, cookie) {
  return service({
    url: `/msg/private?cookie=${cookie}&limit=${limit}`,
    method: 'get'
  })
}

// 设置
export function getSetting(cookie) {
  return service({
    url: `/setting?cookie=${cookie}`,
    method: 'get'
  })
}

// 获取每日推荐歌曲
export function getRecommendSongs(cookie) {
  return service({
    url: `/recommend/songs?cookie=${cookie}`,
    method: 'get'
  })
}

// 私人FM
export function getPersonalFM(cookie) {
  return service({
    url: `/personal_fm?cookie=${cookie}`,
    method: 'get'
  })
}

// 获取用户动态
export function getUserEvent(uid) {
  return service({
    url: `/user/event?uid=${uid}`,
    method: 'get'
  })
}